Skip to main content

Fix "Webalizer not Updating" Problem in cPanel

The Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser. This brief tutorial will show you how to fix Webalizer not updating properly.

Updating Webalizer Stats Manually

Try to manually update your Webalizer stats, if there are problems, the update process should explain what the issue is. That is information you don't get when cPanel runs the update automatically.

You'll need to run this from the command line as the cPanel user that is having issues with Webalizer. You can log in directly as the cPanel user via SSH or you can descend to that user account from the root user. 

If the cPanel user doesn't have shell access and you want to descend to that user's shell from root, execute the following command first:

Execute this as the root user:

su CPANELUSER -s /bin/bash
whoami

⚠️ Replace CPANELUSER with the cPanel username of the account with the Webalizer problem.

If the whoami command doesn't show that you are now the cPanel user, you've done something wrong. Please check your command and try again before continuing.

Now that you are the correct user, execute the following command to manually update Webalizer:

Execute this as the cPanel user:

/usr/local/cpanel/3rdparty/bin/webalizer -d -T -N 10 -D /home/CPANELUSER/tmp/webalizer/dns_cache.db -R 250 -p -n DOMAIN.COM -o /home/CPANELUSER/tmp/webalizer/ /usr/local/apache/domlogs/DOMAIN.COM

⚠️ Replace CPANELUSER with the cPanel username of the user who is having problems with Webalizer.

Replace DOMAIN.COM with the domain or subdomain for which you'd like to update the stats.

If you want to update the stats for the SSL/TLS visits to a domain or subdomain, append -ssl_log to the end of the domain name at the end of the command above.

Examples: (click to expand)
*/usr/local/cpanel/3rdparty/bin/webalizer -d -T -N 10 -D /home/cpguy/tmp/webalizer/dns\_cache.db -R 250 -p -n superspecialdomain12.com -o /home/cpguy/tmp/webalizer/ /usr/local/apache/domlogs/[s](http://superspecialdomain12.com)uperspecialdomain12.com*  
^ This updates the Webalizer stats for the domain *superspecialdomain12.com* that is owned by the user *cpguy* for non SSL/TLS traffic.

*/usr/local/cpanel/3rdparty/bin/webalizer -d -T -N 10 -D /home/cpguy/tmp/webalizer/dns\_cache.db -R 250 -p -n superspecialdomain12.com -o /home/cpguy/tmp/webalizer/ /usr/local/apache/domlogs/superspecialdomain12.com-ssl\_log*
^ This updates the Webalizer stats for the domain *superspecialdomain12.com* that is owned by the user *cpguy* for SSL/TLS traffic.
A successful run will look something like this: (click to expand)
Webalizer V2.23-08 (Linux 3.10.0-957.12.2.el7.x86\_64 x86\_64) English  
Using logfile /usr/local/apache/domlogs/superspecialdomain12.com (clf)
DNS Lookup (10): Giving 16 bytes to Child 0
Giving 16 bytes to Child 1
Child 9 got closed input, shutting down
Reaped Child 428
Child 8 got closed input, shutting down
Child 1 getnameinfo failed\!
Child 0 getnameinfo failed\!
Child 1 could not resolve: 175.143.230.1 (no cache)
Child 1 back in task pool
Child 0 could not resolve: 39.97.32.1 (no cache)
Child 0 back in task pool
Reaped Child 427
Child 7 got closed input, shutting down
Reaped Child 426
Child 6 got closed input, shutting down
Reaped Child 425
Child 5 got closed input, shutting down
Reaped Child 424
Child 4 got closed input, shutting down
Reaped Child 423
Child 3 got closed input, shutting down
Reaped Child 422
Child 2 got closed input, shutting down
Reaped Child 421
Child 1 got closed input, shutting down
Reaped Child 420
Child 0 got closed input, shutting down
Reaped Child 419
2 addresses in 1 seconds, 2/sec
Using DNS cache file /home/cpguy/tmp/webalizer/dns\_cache.db
Creating output in /home/cpguy/tmp/webalizer/
Hostname for reports is 'superspecialdomain12.com'
Reading history file... webalizer.hist
Reading previous run data.. webalizer.current
Generating summary report
3 records (3 ignored) in 1 seconds, 3/sec

Common Issues and What to Do About Them

Here are some common issues you may run across. We'll explain what to do (or investigate) in each case.

Webalizer Corrupted or not Installed

Webalizer isn't installed properly or may be corrupted

If Webalizer isn't installed correctly or it is corrupted, you will run into issues. You can try to fix the problem, by running the following commands via SSH as root:

/usr/local/cpanel/scripts/update_local_rpm_versions --edit target_settings.webalizer installed
/usr/local/cpanel/scripts/check_cpanel_rpms --fix

After this, you can choose to force a run of cPanel's web stats processing task by running the following command:

/usr/local/cpanel/scripts/runstatsonce

If this doesn't solve your problem, try one of the other fixes listed on this page.

User File Access Issue

Webalizer cannot Read or Write the Files Stored in the cPanel User Account

cPanel stores the Webalizer data files for each user account in /home/CPANELUSER/tmp/webalizer/.  This directory contains all of the image, HTML and cache files needed for Webaziler and cPanel to display the parsed web statistics. If Webalizer cannot write to this location or read files from it, there will be a number of problems.

  1. All of the files and directories in /home/CPANELUSER/tmp/webalizer/* ***(including the webalizer directory itself) should be owned by the cPanel user.
    • The files should all be set to 0644 permissions.
    • The directories should all be set to 0755 permissions.
    • Change ownership or permissions on files (recursively if needed).
  2. Another possibility is that some files or directories are corrupted in the cPanel user account or the account is over its assigned disk quota.
    • Look to see if you can write to files in the webalizer directory when active as the cPanel user (not root).
    • If you run into any issues, check to make sure the account is not at or near its resource limits.
    • If the resource limits are OK, check to see if some files aren't readable and make sure you can touch files successfully in the webalizer directory.
    • If it looks like some files are corrupted, move those files out of the webalizer directory and try updating Webalizer again.
    • If you cannot touch files successfully in that directory, you may be out of disk space or the file system may be corrupted. Either add more disk space to the user/server or run a file system check (fsck) on the drive.
Domlog Issue

Webalizer cannot Read Raw Data from the Domain's Domlog File

Webalizer itself does not actually collect the raw visitor data. That work is done by Apache, the web server and that data can be found in one of two locations on cPanel servers:

*/usr/local/apache/domlogs*  
or
*/etc/apache2/logs/domlogs*

The first location is the "traditional" location that older versions of cPanel utilized. On modern versions of cPanel, you can still see the data in this location because cPanel creates symlinks to the data in its new location.

The second location is where the domain logs for Apache are stored now on cPanel servers. This more closely matches Linux location standards.

The domain logs we're looking for will be named after the domain or subdomain itself (appending -ssl_log if the connections were made to the SSL/TLS version of the site). Here’s what a sample of good raw log data looks like:

111.111.111.111 - - [14/Jun/2019:03:44:31 -0400] "GET /man/ HTTP/1.1" 301 233 "https://supersuperspecialdomain12.com/man/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36"     

ℹ️ This shows the IP address that visited the site followed by the date and time (based on local server time), the actual request, the request type, the result, the full URL and then the user agent string of their web browser.

Here are the things to check when dealing with a potential domlog issue:

  1. If the raw domlog entries don't look like this on your system, Apache may be set to use a different domlog data recording format. This is set in the /usr/local/apache/conf/httpd.conf file in the vhost section for each domain or subdomain, but you should never manually edit that file. You can control the global log file format in the following way:
    • Log into WHM as root.

    • Select Apache Configuration which is under the Service Configuration section of the WHM sidebar.

    • Click on Global Configuration in the main interface screen.

    • Scroll down to the LogFormat items in the list. There should be two, one labeled Common and another labeled Combined.

      • Ideally, both of these should be set to the default values. If they aren't, click the radio button next to the default lines.
      • Click Save to save those changes (even if you didn't make any, since we want WHM to update the httpd.conf file).
      • On the next screen it will show you the settings you've chosen and you should click Rebuild Configuration and Restart Apache to do just that.
    • When done, check the /usr/local/apache/conf/httpd.conf file for the vhost entries and make sure the LogFormat lines look like the combines and common defaults shown in WHM.

    • If the change doesn't fix the problem, check to see if that domain is using a custom Apache vhost template. Remove or edit the template and see if that fixes the problem.

      ⚠️ These fixes will not repair any old data that was recorded in the wrong format. There will be a gap in your records.

  2. Another problem that can cause issues is improper permissions or ownership on the domlogs directory or the files inside that directory. 
    • The domlogs directory has very special permissions and ownership, so be careful when you make any changes. A properly configured domlog directory looks like this:

      drwx--x--x. 34 root   wheel   10K Jun 14 14:15 domlogs
      Access: (0711/drwx--x--x) Uid: ( 0/ root) Gid: ( 10/ wheel)
    • The domain log files themselves also have special permissions:

      -rw-r-----   2 root cpguy         0 Jun 14 14:14 superspecialdomain12.comAccess: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 1111/ cpguy)
    • If you have to make changes to the permissions or ownership of any domlog files or the directory, be sure to restart Apache to be safe.

  3. File corruption could also be an issue. This can sometimes happen after an unexpected reboot or storage problem. If domlog files are damaged, you will need to remove them and restart Apache. They will be recreated as needed, but all data in the removed files will not make it into Webalizer.
  4. Don't forget to check the file ownership and permissions on directories above the domlogs directory, as that will affect the ability to write to or access the files here.
Unable to Run

Webalizer is Disabled or Unable to Finish Processing Domlogs

It might sound obvious, but it is possible that Webalizer has been configured not to run for the cPanel user account or it is running, but is unable to finish, possibly because of other accounts taking too long to process.

Either way, this is something can can be checked and possibly even fixed via WHM.

✅ TL/DR

Make sure that Webalizer is turned on for all cPanel accounts you want to have access to those stats.

Also, ensure that your web stats are processed with enough frequency and that they have plenty of time to finish processing.

  1. Log into WHM on your server as root (or get your system administrator to do this part).
  2. Click on Statistics Software Configuration from the Server Configuration section of the WHM sidebar.
  3. Check to see if your server is able to keep up with the current statistics processing schedule. If it is, you should see green text telling you that it is able to keep up near the top of the screen. If it isn't able to keep up, that will be noted in the same location. 
    1. Problems keeping up with with statistics processing can be caused by a number of issues, the first of which could be that there isn't enough time configured for the cPanel stats process to run each day, see the solutions under step 7.
    2. If your server has plenty of time to process and still isn't finishing, it is possible that there is a problem processing data from some other account and it is causing the account or accounts you are looking at to not get processed. Check the solutions under step 5.
    3. If there aren't any issues with data from other cPanel accounts, it is possible that the stats processor itself is frozen and unable to complete anything more. In this case, sometimes killing the active stats processor will clear things out and let a new attempt to process stats to work.
      1. If the stats process is currently running, you'll need to log into your server via SSH as root and find and kill the stats process.
        1. The stats process will likely show up running as /usr/local/cpanel/scripts/runweblogs CPANELUSER or  as part of the cpanellogd process running for CPANELUSER or /usr/local/cpanel/bin/logrunner referencing a specific domain.
      2. Now start a new run of the web log process by following the directions in the Recovery section below this tab.
  4. Check to make sure that Webalizer is available for use by looking in the Generators Configuration section of this screen. Webalizer should be checked (enabled) in the Available to Users column at least. Enabling it under the Active by Default column is optional. If it isn't listed as Available to Users make sure you check that box and click the Save button under this table.
  5. You can check to see if particular accounts are up-to-date with processing or if they have one or more of the stats packages disabled by selecting a user (or All) from the drop down list next to User to Display: in the See Specific User's Statistics Summary section. Click Go to view the results.
    1. You will be shown each user's last successful stats processing time, the bandwidth logging time and whether each of the available stats packages are enabled or not.
      See Whether a Domain has Issues with Web Stats Processing
    2. If a web stats package is disabled, it will be shown in red under the appropriate column. Click on the word Details in any column to be shown why that domain has that status.
      See why a Web Stats Package is Enabled or Disabled
    3. You will be able to change that status from this screen by clicking the Change link next to the appropriate line. Clicking the link will take you back to WHM or into that user's cPanel account (if the root or reseller login override is enabled). If you need to change the setting in the cPanel user's account, look for the Metrics Editor and click on it and enable or disable processing as needed.
  6. You can also control who has the ability to turn on or off certain web statistics programs. If an account has Webalizer turned off, that may explain the reason why it isn't working. The step above will likely catch this sort of issue, but just in case, here's how to double check this particular setting.
    1. In the User Permissions box, you can click the Choose Users button to select the specific cPanel accounts that can access the web stats programs that are marked as available to users.
      1. In this section, you will be able to add or remove cPanel accounts from being able to change what web stats programs they use.
      2. More importantly for this article, you also have the ability to type in a cPanel user name into the Choose Specific Stats Programs for: field and click Configure to ensure Webalizer is enabled for that particular cPanel user.
    2. You can also check the box next to Allow all users to change their web statistics generating software and click the Save button to apply changes.
  7. Finally, you can check your web statistics processing schedule to make sure your server is set to process web statistics (including Webalizer) frequently enough and that it has enough time to finish processing.These settings are all in the Schedule Configuration section.
    1. Changing the number of hours in the Log Processing Frequency will adjust how often cPanel processes web statistics for all users. Processing stats uses a fair amount of resources, so you don't want to run them too frequently, but it is also important to note that if you wait a long time between processing, the process will have a lot more data to go through, especially on busy servers. That might cause the process to run for an extended period of time. By default this is 24 hours, and that's usually a safe value for most servers. Click Change to apply your alteration.

    2. You can also set how often bandwidth usage is calculated for cPanel accounts by altering the Bandwidth Processing Frequency. Leave this at the default unless you know you need to change it.

      ⚠️ Changing these settings will not stop stats and bandwidth processing if it is currently running on your server.

    3. Click Configure Statistic Process Time Schedule if you want to make sure that web stats processing doesn't happen during certain times of the day or while nightly backups are running.

      1. Check boxes next to each hour under Statistics Processing Times that you want to make sure that web statistics are NOT run. Click Save to apply your changes to the next run of the web stats process.

        ⚠️ If the web stats process is running and you told it not to run during that hour, the running process will be stopped. The stats processing will not start again until the next time the stats process is scheduled to run (for example 24 hours later). If you don't give the stats process enough time to run it will never complete and that will cause problems with updating Webalizer stats (or any of the other programs) for anyone it is not able to finish processing.

    4. Under Additional Options you can choose to not allow web stats to be processed while nightly backups are running. This can reduce the load on your server, but it may contribute to the web stats not getting fully processed. Click Save to apply any changes you make.

Recovery

Once you've found and potentially fixed the issue, you'll want to try processing stats again and ensure that everything is working as expected.

Of course you could manually run the Webalizer log processing feature again as you did above when you were first trying to diagnose the issue, but you really should let cPanel's standard statistics processor run to ensure the problem won't reoccur the next time stats are processed.

To trigger another run by cPanel for one or more users, you should:

  1. Log into WHM as root if you aren't already.

  2. Click on Statistics Software Configuration from the Server Configuration section of the WHM sidebar.

  3. In the Process Statistics for User box, select the user you want to process stats for from the drop-down list and click the Go button. If you want to process more than one user, repeat this step for each user you want to process.

  4. The processing will take place in the background. Wait until it is complete and check the account's Webalizer stats again.

    If you prefer to run updates for all cPanel users for all active web statistics programs, you can do so by logging into your server via SSH as root and executing the following command:
    /usr/local/cpanel/scripts/runstatsonce

If you don't get any errors but you don't see new statistics in Webalizer make sure there are several additional hits on the website before you process stats again.